<?php

namespace App\Modules\Doctor\Models;


use Illuminate\Database\Eloquent\Model;

/**
 * Class Graphic 医生咨询时间设置
 * @package App\Modules\Task\Models
 */
class ConsultingTime extends Model
{
    protected $table = 'consulting_time';

    protected $fillable = ['id', 'doctor_id', 'weeks_type', 'start_time', 'end_time', 'created_at', 'updated_at', 'status'];

    static function getList($param)
    {
        return self::where('status','>=',0)->paginate($param['size']);
    }


    static function getDetails($id)
    {
        return self::where('id',$id)->first();
    }

    static function add($param)
    {
        // TODO check
        return self::create($param);
    }
}